#ifndef PROTOCOLE_H
#define PROTOCOLE_H

#include <map>
#include <string>

class Protocole
{
 public  :
  
  Protocole()
    {
      /* ETUDIANT->MASTER */
      _messages["ETUD/LOGIN"]             = (char)10;
      _messages["ETUD/CHOIX"]             = (char)11;
      _messages["SALLE/CLOSED"]           = (char)12;
      _messages["ETUD/CHOIX/SALLE"]       = (char)13;
      _messages["ETUD/CHOIX/ACTIVITE"]    = (char)14;
      _messages["ETUD/LOGOUT"]            = (char)15;
      _messages["ETUD/REP /QCM"]          = (char)16;
      _messages["ETUD/REP /Q2"]           = (char)17;
      _messages["ETUD/REP /Q3"]           = (char)18;
      _messages["ETUD/AST/MSG"]           = (char)19;

      /* MASTER->ETUDIANT */
      _messages["ETUD/ERR/LOGIN"]         = (char)20;
      _messages["ETUD/LISTE"]             = (char)21;
      _messages["ETUD/ERR/CHOIXSALLE"]    = (char)22;
      _messages["ETUD/OK/CHOIXSALLE"]     = (char)23;
      _messages["ETUD/ERR/CHOIXACTIVITE"] = (char)24;
      _messages["ETUD/OK/CHOIXACTIVITE"]  = (char)25;
      _messages["AST/MSG"]                = (char)26;
      _messages["AST/VOIP"]               = (char)27;
      _messages["ETU/QCM"]                = (char)28;
      _messages["ETU/Q2"]                 = (char)29;
      _messages["ETU/Q3"]                 = (char)30;
      _messages["ETU/Q4"]                 = (char)31;      
      _messages["ET U/OBS /Q4"]           = (char)32;      
      _messages["ETU/FIN/ACTIVITE"]       = (char)33;      

      /* OBSERVATEUR->MASTER */
      _messages["OBS/LOGIN"]              = (char)40;
      _messages["OBS/CHOIX"]              = (char)41;
      _messages["OBS/ACTIVITES"]          = (char)42;
      _messages["OBS/LOGOUT"]             = (char)43;
      
      /* MASTER->OBSERVATEUR */
      _messages["OBS/ERR/LOGIN"]          = (char)50;
      _messages["OBS/LISTE"]              = (char)51;
      _messages["OBS/ERR/CHOIX"]          = (char)52;
      _messages["OBS/OK/CHOIX"]           = (char)53;
      _messages["OBS/ACTIVITES/OK"]       = (char)54;
      _messages["ETUD/CHOIX/ACTIVITE"]    = (char)55;
      _messages["ETUD/LOGOUT"]            = (char)56;
      _messages["ETUD/FIN/ACTIVITE"]      = (char)57;
      _messages["ETUD/OBS/REP/QCM"]       = (char)58;
      _messages["ETUD/OBS/REP/Q2"]        = (char)59;
      _messages["ETUD/OBS/REP/Q3"]        = (char)60;
      
      /* MASTER->ASTISTANT */
      _messages["AST/ERR/LOGIN"]          = (char)70;
      _messages["AST/OK/LOGIN"]           = (char)71;
      _messages["AST/IP"]                 = (char)72;
      _messages["ETUD/AST/LOGOUT"]        = (char)73;
      _messages["ETUD/MSG"]               = (char)74;

      /* ASSISTANT->MASTER */
      _messages["AST/LOGIN"]              = (char)80;
      _messages["AST/LOGOUT"]             = (char)81;
      _messages["AST/ETU/MSG"]            = (char)82;
      _messages["AST/ETU/VOIP"]           = (char)83;
    }

  ~Protocole()
    {
    }
  
  char operator[](std::string s)
  {
    return _messages[s];
  }
  
	std::map<std::string, char> _messages;
};
    


#endif
